<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>${article.title} - ${site.name}</title>
    <meta name="description" content="${article.articleExt.seoDescription}">
    <meta name="keywords" content="${article.articleExt.seoKeywords}">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f0f2f5;
        }

        .activity-container {
            max-width: 900px;
            margin: 20px auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
            overflow: hidden;
        }

        .activity-header {
            background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
            color: white;
            padding: 40px;
            text-align: center;
            position: relative;
        }

        .activity-header::before {
            content: '🎉';
            font-size: 60px;
            position: absolute;
            top: 20px;
            right: 30px;
            opacity: 0.3;
        }

        .activity-status {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 20px;
            border-radius: 25px;
            font-size: 14px;
            margin-bottom: 20px;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: bold;
        }

        .activity-title {
            font-size: 32px;
            font-weight: bold;
            margin-bottom: 15px;
            line-height: 1.3;
        }

        .activity-subtitle {
            font-size: 18px;
            opacity: 0.9;
            margin-bottom: 25px;
        }

        .activity-meta {
            display: flex;
            justify-content: center;
            gap: 25px;
            font-size: 14px;
            opacity: 0.9;
            flex-wrap: wrap;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .activity-banner {
            position: relative;
            overflow: hidden;
        }

        .activity-banner img {
            width: 100%;
            height: 300px;
            object-fit: cover;
        }

        .activity-banner-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
            color: white;
            padding: 30px;
        }

        .activity-countdown {
            background: #ff5722;
            color: white;
            padding: 20px;
            text-align: center;
            font-weight: bold;
        }

        .countdown-title {
            font-size: 18px;
            margin-bottom: 10px;
        }

        .countdown-timer {
            font-size: 24px;
            font-family: 'Monaco', monospace;
        }

        .activity-content-wrapper {
            padding: 40px;
        }

        .activity-highlights {
            background: #f3e5f5;
            border-radius: 12px;
            padding: 25px;
            margin-bottom: 30px;
            border-left: 5px solid #9c27b0;
        }

        .activity-highlights h3 {
            color: #9c27b0;
            font-size: 20px;
            margin-bottom: 15px;
        }

        .highlights-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .highlight-item {
            background: white;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .highlight-icon {
            font-size: 30px;
            margin-bottom: 10px;
        }

        .highlight-text {
            font-size: 14px;
            font-weight: bold;
            color: #555;
        }

        .activity-content {
            font-size: 16px;
            line-height: 1.8;
            margin: 30px 0;
        }

        .activity-content h2 {
            color: #9c27b0;
            font-size: 24px;
            margin: 30px 0 15px 0;
            padding-bottom: 10px;
            border-bottom: 2px solid #f3e5f5;
        }

        .activity-content h3 {
            color: #555;
            font-size: 20px;
            margin: 25px 0 12px 0;
        }

        .activity-content p {
            margin-bottom: 18px;
            text-align: justify;
        }

        .activity-content ul,
        .activity-content ol {
            margin: 20px 0;
            padding-left: 30px;
        }

        .activity-content li {
            margin-bottom: 10px;
        }

        .activity-schedule {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 25px;
            margin: 30px 0;
        }

        .activity-schedule h3 {
            color: #9c27b0;
            font-size: 22px;
            margin-bottom: 20px;
        }

        .schedule-item {
            display: flex;
            align-items: center;
            padding: 15px 0;
            border-bottom: 1px solid #e9ecef;
        }

        .schedule-item:last-child {
            border-bottom: none;
        }

        .schedule-time {
            background: #9c27b0;
            color: white;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: bold;
            margin-right: 20px;
            min-width: 100px;
            text-align: center;
        }

        .schedule-content {
            flex: 1;
        }

        .schedule-title {
            font-weight: bold;
            color: #333;
            margin-bottom: 5px;
        }

        .schedule-desc {
            font-size: 14px;
            color: #666;
        }

        .activity-registration {
            background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
            color: white;
            padding: 30px;
            border-radius: 12px;
            text-align: center;
            margin: 30px 0;
        }

        .registration-title {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 15px;
        }

        .registration-desc {
            font-size: 16px;
            margin-bottom: 20px;
            opacity: 0.9;
        }

        .registration-button {
            background: white;
            color: #9c27b0;
            padding: 12px 30px;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            text-decoration: none;
            display: inline-block;
            transition: transform 0.3s;
        }

        .registration-button:hover {
            transform: translateY(-2px);
        }

        .activity-info {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin: 30px 0;
        }

        .info-card {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
        }

        .info-icon {
            font-size: 40px;
            margin-bottom: 15px;
        }

        .info-title {
            font-size: 16px;
            font-weight: bold;
            color: #9c27b0;
            margin-bottom: 10px;
        }

        .info-content {
            font-size: 14px;
            color: #666;
        }

        .activity-footer {
            background: #f8f9fa;
            padding: 30px 40px;
            border-top: 1px solid #e9ecef;
        }

        .activity-contact {
            background: #e3f2fd;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .activity-contact h4 {
            color: #1976d2;
            margin-bottom: 10px;
        }

        .activity-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            color: #666;
            padding-top: 20px;
            border-top: 1px solid #e9ecef;
        }

        .breadcrumb {
            background: #e9ecef;
            padding: 15px 40px;
            font-size: 14px;
        }

        .breadcrumb a {
            color: #9c27b0;
            text-decoration: none;
        }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .activity-container {
                margin: 10px;
                border-radius: 10px;
            }

            .activity-header {
                padding: 25px 20px;
            }

            .activity-title {
                font-size: 24px;
            }

            .activity-content-wrapper,
            .activity-footer,
            .breadcrumb {
                padding: 20px;
            }

            .activity-meta {
                flex-direction: column;
                gap: 10px;
            }

            .highlights-grid,
            .activity-info {
                grid-template-columns: 1fr;
            }

            .schedule-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .schedule-time {
                margin-right: 0;
            }

            .activity-stats {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
        }
    </style>
</head>
<body>
    <div class="activity-container">
        <!-- 面包屑导航 -->
        <nav class="breadcrumb">
            <a href="/">首页</a> > 
            <a href="/portal/channel/${article.channelId}">${article.channel.name}</a> > 
            ${article.title}
        </nav>

        <!-- 活动头部 -->
        <header class="activity-header">
            <div class="activity-status">精彩活动</div>
            <h1 class="activity-title">${article.title}</h1>
            <#if article.subtitle??>
                <p class="activity-subtitle">${article.subtitle}</p>
            </#if>
            
            <div class="activity-meta">
                <span class="meta-item">
                    <span>📅</span>
                    <span>活动时间：${article.publishDate?string('MM月dd日')}</span>
                </span>
                <span class="meta-item">
                    <span>📍</span>
                    <span>活动地点：${article.source!'待定'}</span>
                </span>
                <span class="meta-item">
                    <span>👥</span>
                    <span>主办方：${article.author!'主办方'}</span>
                </span>
                <span class="meta-item">
                    <span>👁️</span>
                    <span>${article.views} 人关注</span>
                </span>
            </div>
        </header>

        <!-- 活动横幅 -->
        <#if article.image??>
            <div class="activity-banner">
                <img src="${article.image}" alt="${article.title}">
                <div class="activity-banner-overlay">
                    <h3>不容错过的精彩活动</h3>
                    <p>立即报名参与，享受独特体验</p>
                </div>
            </div>
        </#if>

        <!-- 倒计时 -->
        <div class="activity-countdown">
            <div class="countdown-title">🕐 活动倒计时</div>
            <div class="countdown-timer" id="countdown">活动进行中</div>
        </div>

        <!-- 活动内容 -->
        <div class="activity-content-wrapper">
            <!-- 活动亮点 -->
            <div class="activity-highlights">
                <h3>🌟 活动亮点</h3>
                <div class="highlights-grid">
                    <div class="highlight-item">
                        <div class="highlight-icon">🎁</div>
                        <div class="highlight-text">精美礼品</div>
                    </div>
                    <div class="highlight-item">
                        <div class="highlight-icon">🎤</div>
                        <div class="highlight-text">专家分享</div>
                    </div>
                    <div class="highlight-item">
                        <div class="highlight-icon">🤝</div>
                        <div class="highlight-text">交流互动</div>
                    </div>
                    <div class="highlight-item">
                        <div class="highlight-icon">📸</div>
                        <div class="highlight-text">精彩瞬间</div>
                    </div>
                </div>
            </div>

            <!-- 活动详情 -->
            <div class="activity-content">
                ${article.articleExt.content}
            </div>

            <!-- 活动日程 -->
            <div class="activity-schedule">
                <h3>📋 活动日程</h3>
                <div class="schedule-item">
                    <div class="schedule-time">09:00</div>
                    <div class="schedule-content">
                        <div class="schedule-title">签到入场</div>
                        <div class="schedule-desc">参会人员签到，领取活动资料</div>
                    </div>
                </div>
                <div class="schedule-item">
                    <div class="schedule-time">09:30</div>
                    <div class="schedule-content">
                        <div class="schedule-title">开幕致辞</div>
                        <div class="schedule-desc">主办方致欢迎辞，介绍活动安排</div>
                    </div>
                </div>
                <div class="schedule-item">
                    <div class="schedule-time">10:00</div>
                    <div class="schedule-content">
                        <div class="schedule-title">主题演讲</div>
                        <div class="schedule-desc">行业专家分享最新趋势和见解</div>
                    </div>
                </div>
                <div class="schedule-item">
                    <div class="schedule-time">12:00</div>
                    <div class="schedule-content">
                        <div class="schedule-title">午餐交流</div>
                        <div class="schedule-desc">自由交流，建立联系</div>
                    </div>
                </div>
            </div>

            <!-- 活动信息 -->
            <div class="activity-info">
                <div class="info-card">
                    <div class="info-icon">📅</div>
                    <div class="info-title">活动时间</div>
                    <div class="info-content">${article.publishDate?string('yyyy年MM月dd日')}</div>
                </div>
                <div class="info-card">
                    <div class="info-icon">📍</div>
                    <div class="info-title">活动地点</div>
                    <div class="info-content">${article.source!'会议中心'}</div>
                </div>
                <div class="info-card">
                    <div class="info-icon">👥</div>
                    <div class="info-title">参与人数</div>
                    <div class="info-content">限额 ${article.favorites * 10} 人</div>
                </div>
                <div class="info-card">
                    <div class="info-icon">💰</div>
                    <div class="info-title">参与费用</div>
                    <div class="info-content">免费参与</div>
                </div>
            </div>

            <!-- 报名区域 -->
            <div class="activity-registration">
                <h3 class="registration-title">🎯 立即报名参与</h3>
                <p class="registration-desc">名额有限，先到先得！不要错过这个难得的机会</p>
                <a href="#register" class="registration-button">立即报名</a>
            </div>
        </div>

        <!-- 活动底部 -->
        <footer class="activity-footer">
            <!-- 联系信息 -->
            <div class="activity-contact">
                <h4>📞 联系我们</h4>
                <p>如有疑问，请联系活动组委会</p>
                <p>联系人：${article.editor!'活动组委会'}</p>
                <p>电话：${article.source!'400-123-4567'}</p>
                <p>邮箱：event@${site.domain!'example.com'}</p>
            </div>

            <!-- 统计信息 -->
            <div class="activity-stats">
                <div>
                    <span>发布时间：${article.publishDate?string('yyyy-MM-dd')}</span>
                    <span style="margin-left: 20px;">最后更新：${article.updateDate?string('yyyy-MM-dd')}</span>
                </div>
                <div>
                    <span>关注：${article.views} 人</span>
                    <span style="margin-left: 20px;">收藏：${article.favorites} 人</span>
                    <span style="margin-left: 20px;">分享：${article.ups} 次</span>
                </div>
            </div>
        </footer>
    </div>

    <script>
        // 简单的倒计时功能
        function updateCountdown() {
            const now = new Date().getTime();
            const eventDate = new Date('${article.publishDate?string('yyyy-MM-dd')}').getTime();
            const distance = eventDate - now;

            if (distance > 0) {
                const days = Math.floor(distance / (1000 * 60 * 60 * 24));
                const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
                const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
                
                document.getElementById('countdown').innerHTML = 
                    days + "天 " + hours + "小时 " + minutes + "分钟";
            } else {
                document.getElementById('countdown').innerHTML = "活动进行中";
            }
        }

        // 每分钟更新一次倒计时
        updateCountdown();
        setInterval(updateCountdown, 60000);
    </script>
</body>
</html>
